package br.com.registrofinancas.util;

import java.text.NumberFormat;
import java.util.Currency;
import java.util.Locale;

import android.content.Context;

public class CurrencyUtils {
	public static String formataValor(Double valor, Context contexto){
		Locale locale = contexto.getResources().getConfiguration().locale;
		NumberFormat numberFormat = NumberFormat.getNumberInstance();
		Currency currency = Currency.getInstance(locale);
		return currency.getSymbol() + " " + numberFormat.format(valor);
	}
}
